function [ mpc ] = testMPC( sys, x, u, k, param )
%TESTMPC Summary of this function goes here
%   Detailed explanation goes here
mpc=InitMPC(sys,diag(param.diagQ),diag(param.diagR),diag(param.diagH));
mpc=MPCSampling(mpc,param.Tp,param.Tvz,blockMatrix(sys,param.Tvz,param.Block));
mpc=MPCHardBounds(mpc,createBounds(2,param.Tvz,param.lb,param.boundLocation,-1),createBounds(2,param.Tvz,param.ub,param.boundLocation,1));
mpc=MPCSoftBounds(mpc,createBounds(2,param.Tp,param.lb_w,[],-1),createBounds(2,param.Tp,param.ub_w,[],1),selectSoftBounds(length(sys.A),param.Tp,param.kroky,param.promenne));
mpc=addMPCstate(mpc,x);
mpc=addMPCcontrol(mpc,u);   
mpc=addMPCref(mpc,param.ref(k)*ones(2*param.Tp,1));
mpc.model=@testSol;
mpc.param=param;

end

